-- GENERATED SPELL FOR [Magistrate Henry Maleb] --


function spell0_2276(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_2276', 0, 1)
end

function spell1_2276(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15531,pUnit)
pUnit:RegisterEvent('Sorts_2276', 8326, 1)
end

function spell2_2276(pUnit, Event) --@Frostbolt,Self--
pUnit:FullCastSpellOnTarget(12737,pUnit)
pUnit:RegisterEvent('Sorts_2276', 7000, 1)
end

function Sorts_2276(pUnit, Event)
local choix_sorts_2276 = math.random(0, 2)
if choix_sorts_2276 == 0 then
pUnit:RegisterEvent('spell0_2276', 1, 1)
end
if choix_sorts_2276 == 1 then
pUnit:RegisterEvent('spell1_2276', 1, 1)
end
if choix_sorts_2276 == 2 then
pUnit:RegisterEvent('spell2_2276', 1, 1)
end
end

function mob2276_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2276', math.random(1500, 3000), 1)
end

function mob2276_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2276_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2276_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2276, 1, 'mob2276_Action')
RegisterUnitEvent(2276, 2, 'mob2276_Leave')
RegisterUnitEvent(2276, 3, 'mob2276_Kill')
RegisterUnitEvent(2276, 4, 'mob2276_Die')
